using System;
using System.Threading;

namespace eLoop;

public unsafe interface ITaskScheduler : IDisposable
{
    string Id { get; }

    int ThreadId { get; }

    string Name { get; }

    long RefCount { get; }

    bool IsDisposed { get; }

    bool IsEquals(ITaskScheduler scheduler);

    void Reference();

    void Unreference();
    
    void Schedule(IRunnable runnable, object o);
    void Schedule(delegate*<object, void> action, object o);
    void Schedule(IThreadPoolExecutor executor);

    void Schedule0(WaitCallback action, object o);

    void Schedule1(Action<object> action, object o);
}
